package com.cskaoyan.vo.market;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @program: mall
 * @description:
 * @author: Mr.Mengmeng
 * @create: 2021-04-10 23:15
 **/
@Data
public class IssueListVo {

    /**
     * total : 8
     * items : [{"id":25,"question":"dd","answer":"ss","addTime":"2021-04-10 20:42:29","updateTime":"2021-04-10 20:42:29","deleted":false},{"id":24,"question":"我浩浩是最屌的","answer":"嗯嗯嗯嗯，坠雕的6666","addTime":"2021-04-10 17:41:32","updateTime":"2021-04-10 20:58:37","deleted":false},{"id":23,"question":"安分","answer":"阿斯蒂芬","addTime":"2021-04-10 16:05:02","updateTime":"2021-04-10 16:05:02","deleted":false},{"id":22,"question":"什么鬼哈哈","answer":"超神","addTime":"2021-04-10 11:24:44","updateTime":"2021-04-10 14:36:04","deleted":false},{"id":21,"question":"123","answer":"123","addTime":"2021-04-10 11:05:15","updateTime":"2021-04-10 11:05:15","deleted":false},{"id":19,"question":"how","answer":"赔钱得到","addTime":"2021-04-10 03:04:33","updateTime":"2021-04-10 03:41:16","deleted":false},{"id":12,"question":"c's","answer":"菜市场","addTime":"2021-04-09 20:13:10","updateTime":"2021-04-09 20:13:10","deleted":false},{"id":3,"question":"如何申请退货？","answer":"不给你退，爱咋咋地。不服你咬我啊，啦啦啦咬不着","addTime":"2018-02-01 00:00:00","updateTime":"2021-04-10 17:43:37","deleted":false}]
     */

    private long total;
    private List<ItemsBean> items;

    public IssueListVo(long total, List<ItemsBean> items) {
        this.total = total;
        this.items = items;
    }

    public IssueListVo() {
    }
    @Data
    public static class ItemsBean {
        /**
         * id : 25
         * question : dd
         * answer : ss
         * addTime : 2021-04-10 20:42:29
         * updateTime : 2021-04-10 20:42:29
         * deleted : false
         */

        private Integer id;
        private String question;
        private String answer;
        @DateTimeFormat
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
        private Date addTime;
        @DateTimeFormat
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
        private Date updateTime;
        private boolean deleted;

    }
}
